<script setup lang="ts">
  defineOptions({
    name: 'OrderCustomFormTextarea',
  })

  const props = defineProps({
    placeholder: {
      type: String,
      default: () => '请输入内容',
    },
    maxlength: {
      type: Number,
      default: () => 200,
    },
    disabled: {
      type: Boolean,
      default: () => false,
    },
  })

  // 绑定的值
  const value = defineModel('modelValue', { type: String, default: '' })
</script>

<template>
  <el-input
    v-model.trim="value"
    clearable
    type="textarea"
    :maxlength="props.maxlength"
    show-word-limit
    :disabled="props.disabled"
    :placeholder="props.placeholder"
  />
</template>

<style scoped lang="scss">
  :deep(.el-textarea__inner) {
    height: 80px;
  }
</style>
